//
//  HQHFreeWriteCollectionViewCell.m
//  LastOne
//
//  Created by 小柠檬 on 15/11/4.
//  Copyright © 2015年 sc. All rights reserved.
//

#import "HQHFreeWriteCollectionViewCell.h"
#import "FitHeader.h"
#import "NightHeader.h"
@implementation HQHFreeWriteCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _imageView = [[UIImageView alloc]init];
        _imageView.frame = CGRectMake(0, 0, 375 * FitWidth, 180 * FitHeight);
        _imageView.backgroundColor = [UIColor yellowColor];
        _imageView.image = [UIImage imageNamed:@"FreeWrite"];
        _imageView.userInteractionEnabled = YES;
        [self.contentView addSubview:_imageView];
        
        _label = [[UILabel alloc]init];
        _label.frame = CGRectMake(5 * FitWidth, 150 * FitHeight, 200 * FitWidth, 30 * FitHeight);
        _label.text = @"二十四小时自由写作";
        _label.font = [UIFont systemFontOfSize:15];
        _label.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_label];
        
        _EnglishLabel = [[UILabel alloc]init];
        _EnglishLabel.frame = CGRectMake(_label.frame.origin.x + 140 * FitWidth, _label.frame.origin.y, 100 * FitWidth, 30 * FitHeight);
        _EnglishLabel.text = @"New Writing";
        _EnglishLabel.textColor = [UIColor whiteColor];
        _EnglishLabel.font = [UIFont systemFontOfSize:10];
        [self.contentView addSubview:_EnglishLabel];
        
        
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapAction)];
        [_imageView addGestureRecognizer:tap];
    }
    return self;
}

-(void)tapAction
{
    [self.myPushDelegate pushAction];
}





/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
